<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>学生考试信息</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            margin: 0;
            background-color: #f4f4f4;
        }
        .container {
            text-align: center;
            padding: 20px;
            border: 1px solid #ccc;
            background-color: white;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
            width: 80%;  /* Adjust the width of the container */
            max-width: 800px;
        }
        table {
            margin-top: 20px;
            width: 100%;
            border-collapse: collapse;
        }
        th, td {
            padding: 8px;
            text-align: center;
            border: 1px solid #ddd;
        }
        th {
            background-color: #f2f2f2;
        }
    </style>
</head>
<body>
<div class="container">
    <h2>学生考试信息</h2>
    <c:if test="${not empty studentExamInfo}">
        <table>
            <tr>
                <th>学生 ID</th>
                <th>姓名</th>
                <th>二级学科</th>
                <th>考试 ID</th>
                <th>考试名称</th>
            </tr>
            <c:forEach var="info" items="${studentExamInfo}">
                <tr>
                    <td>${info.studentId}</td>
                    <td>${info.name}</td>
                    <td>${info.originalAppliedDiscipline}</td>
                    <td>${info.examId}</td>
                    <td>${info.examName}</td>
                </tr>
            </c:forEach>
        </table>
    </c:if>
    <c:if test="${empty studentExamInfo}">
        <p>未找到学生信息</p>
    </c:if>
</div>
</body>
</html>
